#pragma once
#include "afxwin.h"


// CRigCalib dialog

class CRigCalib : public CDialog
{
	DECLARE_DYNAMIC(CRigCalib)

public:
	CRigCalib(CWnd* pParent = NULL);   // standard constructor
	virtual ~CRigCalib();

	//added

protected:
	//get the calibration flags
	void GetCalibrationFlags(int &leftFlag, int &rightFlag);

public:
// Dialog Data
	enum { IDD = IDD_RIG_CALIB };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancel();
	// point to parent, parent->this = NULL, when destroy itself.
	CWnd *m_pParent;
protected:
	virtual void PostNcDestroy();
public:
	virtual BOOL OnInitDialog();
	
protected:
	CButton m_leftFixPP;
	CButton m_leftZeroTanDist;
	// left camera radial distortion level
	CComboBox m_leftRadialDist;
	// calibration result of left camera
	CEdit m_leftCalibRst;

	CButton m_rightFixPP;
	// set right camera zero tangent distortion
	CButton m_rightZeroTanDist;
	// radial distortion of right camera
	CComboBox m_rightRadialDist;
	// calibration result of right camera
	CEdit m_rightCalibRst;


public:
	afx_msg void OnBnClickedCalib();
protected:
	// button contrl
	CButton m_leftFixAspectRatio;
	CButton m_rightFixAspectRatio;	
	CEdit m_rigOrientation;
	// computer rig orientation with 8 points
	CButton m_rigOriEightPts;
public:
	afx_msg void OnEnChangeLeftCalibRst();
	// only calib left camera
	CButton m_calibLeftOnly;
protected:
	CButton m_isBoudleAdjust;
	CButton m_isShowErrDistribution;
};
